home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Database
/
AddressBook
/
Source
/
Appender.m
< prev
next >
Wrap
Text File
|
1992-07-09
|
732b
|
32 lines
/* Appender.m
* You may freely copy, distribute, and reuse the code in this example.
* NeXT disclaims any warranty of any kind, expressed or implied, as to its
* fitness for any particular use.
*/
#import <appkit/appkit.h>
#import "Appender.h"
@implementation Appender
/* Prints the doc view of the scroll view
*/
- print:sender
{
[[scrollView docView] printPSCode:self];
return self;
}
/* Appends the string passed to the doc view of the scroll view
*/
- appendToText:(const char *)newText
{
int currentLength = [[scrollView docView] textLength];
[[scrollView docView] setSel:currentLength :currentLength];
[[scrollView docView] replaceSel:newText];
[[scrollView docView] scrollSelToVisible];
return self;
}
@end